<template>
  <div class="dashboard-container" id="dashboard">
    <div class="dashboard-text">欢迎光临<span v-if="name != null">，{{name}} </span><span v-else>，{{account}} </span></div>


    <el-row style="font-size: 14px">七天前收入情况</el-row>
    <el-row>
      <el-col :span="24">
        <div class="chart section">
        <v-chart :options="lineData" ref="lineChart"/>
        </div>
      </el-col>
    </el-row>
    <el-row style="font-size: 14px">累计收入</el-row>
    <el-row style="font-size: 14px">
      <el-col :span="6">会员费收入：<span style="color: red">￥{{vipIncome}}</span></el-col>
      <el-col :span="6">服务费收入：<span style="color: red">￥{{serviceFeeIncome}}</span></el-col>
      <el-col :span="6">总收入：<span style="color: red">￥{{totalIncome}}</span></el-col>
    </el-row>
  </div>
</template>


<script src="./dashboard.js"></script>
<style rel="stylesheet/scss" lang="scss" scoped>
  .el-row{
    margin-bottom: 20px;
    &:last-child {
      margin-bottom: 0;
    }
  }

.dashboard {

  &-container {
    padding: 15px;
    background-color: #f0f2f5;
  }
  &-text {
    font-size: 14px;
    line-height: 22px;
    padding-bottom:15px;
  }
}
.echarts{
  width: 100%;
  height: 100%;
}
.box-card{
  height:108px;
}
  .chart{
    height: 350px;
  }
  .section{
    padding:20px;
    background-color: white;
    border: 1px solid #ebeef5;
    box-shadow: 0 2px 12px 0 rgba(0,0,0,.1);
  }

  .box-card > div >div > .svg-icon {
    width: 4em;
    height: 4em;
    color:#34bfa3;
  }
  .card-panel-text{
    padding-top:10px;
    font-size:16px;
    color:gray;
  }
  .card-panel-num{
    padding-top:10px;
    font-size:20px;
    font-weight: bold;
  }
</style>
